package com.jeesite.modules.dp.entity.zhibiao;

import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 指标管理Entity
 * @author hancing
 * @version 2024-12-05
 */
@Table(name="dp_indicator", alias="a", label="指标信息", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="create_time", attrName="createTime", label="创建时间", isInsert=false, isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="update_time", attrName="updateTime", label="更新时间", isInsert=false, isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="delete_time", attrName="deleteTime", label="删除时间", isInsert=false, isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="name", attrName="name", label="指标名称", queryType=QueryType.LIKE),
		@Column(name="indicator_classification_id", attrName="indicatorClassificationId", label="指标分类"),
		@Column(name="indicator_key", attrName="indicatorKey", label="指标键"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class DpIndicator extends DataEntity<DpIndicator> {
	
	private static final long serialVersionUID = 1L;
	private Date createTime;		// 创建时间
	private Date updateTime;		// 更新时间
	private Date deleteTime;		// 删除时间
	private String name;		// 指标名称
	private String indicatorClassificationId;		// 指标分类
	private String indicatorKey;		// 指标键

	public DpIndicator() {
		this(null);
	}
	
	public DpIndicator(String id){
		super(id);
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}
	
	@NotBlank(message="指标名称不能为空")
	@Size(min=0, max=191, message="指标名称长度不能超过 191 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="指标分类不能为空")
	@Size(min=0, max=32, message="指标分类长度不能超过 32 个字符")
	public String getIndicatorClassificationId() {
		return indicatorClassificationId;
	}

	public void setIndicatorClassificationId(String indicatorClassificationId) {
		this.indicatorClassificationId = indicatorClassificationId;
	}
	
	@NotBlank(message="指标键不能为空")
	@Size(min=0, max=191, message="指标键长度不能超过 191 个字符")
	public String getIndicatorKey() {
		return indicatorKey;
	}

	public void setIndicatorKey(String indicatorKey) {
		this.indicatorKey = indicatorKey;
	}
	
}